﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using LucyGrid.Interface;
using System.Web;

namespace LucyGrid.Nodes
{
	class LucyMasterRPC: ILucyMaster
	{
		public string EndPoint;

		public LucyMasterRPC(string endpoint)
		{
			EndPoint = endpoint;
		}

		public byte[] Assembly(string fullname)
		{
			return new WebClient().DownloadData(string.Format("{0}/assembly/{1}", EndPoint, HttpUtility.UrlEncode(fullname)));
		}
	}
}
